<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #F8F9FA;
}
-->
</style>
<link href="__PUBLIC__/Admin/Css/skin.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="__PUBLIC__/Admin/Js/jquery-1.4.2.min.js"></script>
<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="17" height="29" valign="top" background="__PUBLIC__/Admin/images/mail_leftbg.gif"><img src="__PUBLIC__/Admin/images/left-top-right.gif" width="17" height="29" /></td>
    <td width="100%s" height="29" valign="top" background="__PUBLIC__/Admin/images/content-bg.gif"><table width="100%" height="31" border="0" cellpadding="0" cellspacing="0" class="left_topbg" id="table2">
      <tr>
        <td height="31"><div class="titlebt">商品管理</div></td>
      </tr>
    </table></td>
    <td width="16" valign="top" background="__PUBLIC__/Admin/images/mail_rightbg.gif"><img src="__PUBLIC__/Admin/images/nav-right-bg.gif" width="16" height="29" /></td>
  </tr>
  <tr>
    <td height="71" valign="middle" background="__PUBLIC__/Admin/images/mail_leftbg.gif">&nbsp;</td>
    <td valign="top" bgcolor="#F7F8F9">
      <table width="100%" height="138" border="0" cellpadding="0" cellspacing="0">
        <tr>
          <td height="13" valign="top">&nbsp;</td>
        </tr>
        <tr>
          <td valign="top">
            <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="left_txt">当前位置：商品列表</td>
              </tr>
              <tr>
                <td height="20"><table width="100%" height="1" border="0" cellpadding="0" cellspacing="0" bgcolor="#CCCCCC">
                  <tr>
                    <td></td>
                  </tr>
                </table></td>
              </tr>       
              <tr>
                <td>
                  <table width="100%" height="40" border="0" cellpadding="0" cellspacing="0">
                    <tr class="nowtable">
                      <td class="left_bt2" align="center">商品图片</td>
                      <td class="left_bt2" align="center">商品名称</td>
                      <td class="left_bt2" align="center">商品所属明星</td>
                      <td class="left_bt2" align="center">所属分类</td>
                      <td class="left_bt2" align="center">商品价格</td>
                      <td class="left_bt2" align="center">链接地址</td>
					  <td class="left_bt2" align="center">商品类型</td>
					  <td class="left_bt2" align="center">人气</td>
                      <td class="left_bt2" align="center">操作</td>
                    </tr>
                    <volist name="list" id="vo" mod="2">  
                    <tr <eq name="mod" value="1">bgcolor="#f2f2f2"</eq> >   
                      <td height="40" class="left_txt" align="center"><img src="__PUBLIC__/Uploads/Goods/72_{$vo.goods_photo_add}" width="40" hieght="40" ></td> 
                      <td height="40" class="left_txt" align="center">{$vo.goods_name}</td>      
                      <td height="40" class="left_txt" align="center">{$vo.chinese_name}</td>
                      <td height="40" class="left_txt" align="center">{$vo.class_name}</td>
                      <td height="40" class="left_txt" align="center">{$vo.goods_price}</td>
                      <td height="40" class="left_txt" align="center"><a href="http://{$vo.goods_path}" target="_blank">{$vo.goods_path|substr=0,30}</a></td>
					  <td height="40" class="left_txt" align="center"><eq name='vo.goods_type' value="2">用户推荐</eq><eq name='vo.goods_type' value="1">系统</eq></td>
					  <td height="40" class="left_txt" align="center"><input size='3' type='text' name='goods_like_num_{$vo.goods_code}' id ='goods_like_num_{$vo.goods_code}' value="{$vo.goods_like_num}" onchange="chengeNum({$vo.goods_like_num},{$vo.goods_code});"></td>
                      <td height="40" class="left_txt" align="center">
                        预览&nbsp;|&nbsp;
                        <eq name='vo.goods_status' value="1"><a href="__URL__/goodsStatus/goods_status/2/goods_code/{$vo.goods_code}">审核</a>&nbsp;|&nbsp;</eq>
                        <eq name='vo.goods_status' value="2"><a href="__URL__/goodsStatus/goods_status/3/goods_code/{$vo.goods_code}">发布</a>&nbsp;|&nbsp;</eq>
                        <eq name='vo.goods_status' value="3">已发布&nbsp;|&nbsp;</eq>
                        <a href="__URL__/goodsAdd/goods_code/{$vo.goods_code}">修改</a>&nbsp;|&nbsp; 
                        <a href="__URL__/goodsDel/goods_code/{$vo.goods_code}">删除</a>
                      </td>
                    </tr>
                  </volist>
                  </table>
                </td>
              </tr>
              <tr>
                <td class="left_txt" align="right">{$page}&nbsp;&nbsp;&nbsp;&nbsp;</td>
              </tr>
            </table>
          </td>
        </tr>
      </table>
    </td>
    <td background="__PUBLIC__/Admin/images/mail_rightbg.gif">&nbsp;</td>
  </tr>
  <tr>
    <td valign="middle" background="__PUBLIC__/Admin/images/mail_leftbg.gif"><img src="__PUBLIC__/Admin/images/buttom_left2.gif" width="17" height="17" /></td>
      <td height="17" valign="top" background="__PUBLIC__/Admin/images/buttom_bgs.gif"><img src="__PUBLIC__/Admin/images/buttom_bgs.gif" width="17" height="17" /></td>
    <td background="__PUBLIC__/Admin/images/mail_rightbg.gif"><img src="__PUBLIC__/Admin/images/buttom_right2.gif" width="16" height="17" /></td>
  </tr>
</table>
<script>
	function chengeNum(oldNum,goodsCode){
		var newNum = $('#goods_like_num_'+goodsCode).val();
		var r = confirm("确定修改人气显示吗");
		//修改人气
		if ( r == true ){
			if(newNum){
				$.getJSON('__URL__/updateNum',{num:newNum,code:goodsCode},function(json){	
					if(json.status==1){
						alert('修改成功');   
					}else{
						alert('修改失败');   
					}       
				});
			 }
		}
		else{
			$('#goods_like_num').val(oldNum);
		}
	}
</script>
</body>
